<?php
/**
 * Created by PhpStorm.
 * User: ZhangWei
 * Date: 2018/4/9
 * Time: 9:47
 */

namespace App\Logic;


class ConfigLogic
{
    public static function getWxConfig()
    {
        $config = [
            'app_id' => config('wx.app_id'),
            'secret' => config('wx.secret'),
            'response_type' => 'array',
        ];

        return $config;
    }

    public static function getWxPayConfig()
    {
        $config = self::getWxConfig();
        $config['mch_id'] = config('wx.mch_id');
        $config['key'] = config('wx.pay_api_key');
        $config['cert_path'] = storage_path('app/cert/1486527942/apiclient_cert.pem');
        $config['key_path'] = storage_path('app/cert/1486527942/apiclient_key.pem');
        $config['notify_url'] = route('xcx_wx_pay');

        return $config;

    }

}